IsEqualTo Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Determines if this bag is equal to another bag. This bag is equal to otherBag if they contain the same number of of copies of equal elements.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public bool IsEqualTo(
	Bag<T> otherBag
)
Visual Basic (Declaration)
Public Function IsEqualTo ( _
	otherBag As Bag(Of T) _
) As Boolean
Visual C++
public:
bool IsEqualTo (
	Bag<T>^ otherBag
)

Parameters

otherBag
Bag<(Of <T>)>
Bag to compare to

Return Value

True if this bag is equal to otherBag, false otherwise.

Remarks

IsSupersetOf is computed in time O(N), where N is the number of unique items in this bag.

Exceptions

ExceptionCondition
System..::InvalidOperationExceptionThis bag and otherBag don't use the same method for comparing items.

See Also